module.exports = (app) => {
    return async function auth(ctx, next) {
        if(!ctx.session.userinfo){
            ctx.error(app.resCode.expiress);
        }else{
            await next();
        }
        
    };
  };